﻿using DoNet.Core;
using DoNet.System.Models;

namespace DoNet.System.IRepositories
{
    /// <summary>
    /// 
    /// </summary>
    public interface IAppRepository : IRepository<App>
    {
        #region 同步方法
        /// <summary>
        /// 获取app对象
        /// </summary>
        /// <param name="appid">应用ID</param>
        /// <param name="secret">应用密钥AppSecret</param>
        /// <returns></returns>
        App GetApp(string appid, string secret);

        /// <summary>
        /// 获取app对象
        /// </summary>
        /// <param name="appid">应用ID</param>
        /// <returns></returns>
        App GetApp(string appid);
        #endregion 同步方法

        #region 异步方法
        /// <summary>
        /// 获取app对象
        /// </summary>
        /// <param name="appid">应用ID</param>
        /// <returns></returns>
        Task<App> GetAppAsync(string appid);
        /// <summary>
        /// 获取app对象
        /// </summary>
        /// <param name="appid">应用ID</param>
        /// <param name="secret">应用密钥AppSecret</param>
        /// <returns></returns>
        Task<App> GetAppAsync(string appid, string secret);
        #endregion 异步方法
    }
}
